import { createApp } from 'vue'
import pinia from './stores'  // store
import ElementPlus from 'element-plus'  // element-plus
import zhCn from 'element-plus/es/locale/lang/zh-cn'  // element-plus
import 'element-plus/dist/index.css'  // element-plus
import App from './App.vue'  // 入口
import router from './router' // 路由
import './styles/index.scss' // 全局css样式
import ElSvg from './components/SvgIcon/ElSvg'  // svg图标组件
import './permission' // 理由守卫

const app = createApp(App)

import CategorySelector from '@/components/CategorySelector/index.vue'
app.component('CategorySelector', CategorySelector)

ElSvg(app)

app.use(pinia)
  .use(router)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount('#app')
